/**
 * @description schema校验配置文件
 * @author 盘柜他爹
 */

const Joi = require('joi');

const userLogin = Joi.object({

    userName: Joi.string()
                .min(6)
                .max(30)
                .required(),

    password: Joi.string()
                .min(6)
                .max(30)
                .required(),
    nickName: Joi.string()
                 .max(30),
    avatar: Joi.string()
                 .max(30)
})

const like_list_one = Joi.object({
    listName: Joi.string().valid("like_list_one"),
    listData: Joi.array().items(Joi.object({
                name: Joi.string()
                         .min(2)
                         .max(30)
                         .required(),

                label: Joi.array().items(
                            Joi.string()
                                .min(2)
                                .max(30)
                                .required()
                            ),
                trends: Joi.string(), //动态
                avatar: Joi.string(),
                video_thumbnail: Joi.string(), //视频，缩略图
            })
    )
})

//列表删除，单个或者批量
const like_list_one_del = Joi.object({
    deleteList:Joi.array().items(Joi.object({
        id: Joi.number().required()
        
    })).required()
})


export {
    userLogin,
    like_list_one,
    like_list_one_del
}